var express = require("express");
var router = express.Router();
var studentService = require("../src/services/studentService")

router.get("/showstudentList",(req,resp)=>{
   
    console.log("in====>>");
    //获得客户端发送过来的当页页数和每页显示的条数
    let currentPage = req.query.currentPage;
    let pageSize = req.query.pageSize;
    console.log(currentPage,typeof pageSize)
    let result =  studentService.showStudentInfoByPage({"currentPage":parseInt(currentPage),"pageSize":parseInt(pageSize)});    
     result.then(data=>{
        resp.json(data);
    })
 
})


module.exports = router;